package com.javatest.validate;

import javax.validation.ConstraintViolation;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @date 2020-11-10 下午1:41
 */
public class ValidatorTest4 {
    public static void main(String[] args) {
        User user = new User();
        user.setName("YourBatman");

        Set<ConstraintViolation<User>> result = ValidationUtils.obtainValidator().validate(user);
        ValidationUtils.printViolations(result);
    }
}
